<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>输出语句</title>
		
	</head>
	<body>
		Username: <input type="text"/><span id="hint"></span>
		
		<script>
			alert("警告弹出框!");
			
			//浏览器F12,控制台中查看
			console.log("控制台输出语句...");
			
			//页面输出内容
			document.write("<b style='color:red'>hello</b>");
			
			//标签中嵌入内容
			hint.innerHTML = "<b style='color:red'>用户名已存在</b>";
			
			/* function checkUsername(){
				var username = document.getElementById("username").value;
				if("admin" == username){
					hint.innerHTML = "<b style='color:red'>用户名已存在</b>";
				}
			} */
		</script>
	</body>
</html>
